package Studing;

/**
 * @ClassName JumpFloorII
 * @Description: TODO
 * @Author hl
 * @Date 2020/5/30
 * @Version V1.0
 **/
public class JumpFloorII {
    public static void main(String[] args) {
        System.out.println(JumpFloorII(3));
    }
    public static int JumpFloorII(int target) {
        int one=1;
        int sum=1;
        if(target==1){
            return one;
        }else{
            for(int i=2;i<=target;i++){
                sum=sum+one;
                one=sum;
            }
        }
        return sum;
    }
}
